function[x1,y1,d] = line_interp(x,y,n),
% just returns n points equidistant between x and y 
%for this silly script i spent whole 2 hours to get it right

lng = sqrt((x(2)-x(1))^2 + (y(2)-y(1))^2);
d = [0:lng/n:lng];
x1 = x(1)+ d./lng*(x(2)-x(1));
y1 = y(1)+ d./lng*(y(2)-y(1));
